const { createProxyMiddleware } = require('http-proxy-middleware')

module.exports = function(app){
    app.use( 
        createProxyMiddleware('/api',{
            target:'http://localhost:7100',
            changeOrigin:true, //用于控制请求头中的host值
            ws:true, //用于支持websocket
            pathRewrite:{'^/api':''}
        })
    )
}